using System;
using System.Reflection;
using System.Drawing;
using System.Drawing.Imaging;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
using System.Windows.Forms;

using System.Security;
using System.Security.Permissions;
using System.Web;
using System.Web.Security;
using Microsoft.SharePoint.Security;


namespace stsdev {
  public class SequentialWorkflowSolutionProvider : ISolutionProvider {

    public string Title {
      get { return "Sequential Workflow Template Solution (C# Assembly)"; }
    }

    public bool LaunchSolutionOnComplete {
      get { return true; }
    }

    public void InitializeSolution() {
      SolutionBuilder.AssemblyDeployment = true;
      SolutionBuilder.SafeControlSettings = false;
      SolutionBuilder.DeploymentTarget = AssemblyDeploymentTarget.GlobalAssemblyCache;
      SolutionBuilder.CasPermissions = false;
      SolutionBuilder.ProjectTypeGuids = "{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}";
    }

    public void AddSolutionItems() {
      // add assembly references
      SolutionBuilder.ProjectAssemblyReferences.Add("System.Drawing");
      SolutionBuilder.ProjectAssemblyReferences.Add("System.Workflow.Activities");
      SolutionBuilder.ProjectAssemblyReferences.Add("System.Workflow.ComponentModel");
      SolutionBuilder.ProjectAssemblyReferences.Add("System.Workflow.Runtime");
      SolutionBuilder.ProjectAssemblyReferences.Add("Microsoft.SharePoint.WorkflowActions, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c");

      WorkflowTemplateBuilder.CreateSequentialWorkflowTemplate("SequentialWorkflow01");
      WorkflowTemplateBuilder.CreateSequentialWorkflowTemplate("SequentialWorkflow02");
      WorkflowTemplateBuilder.CreateWorkflowTemplateFeature();
    }

  }
}
